package cn.com.dhcc.turbo.entity.registry;

import java.io.Serializable;
import java.util.Date;

import cn.com.dhcc.app.core.annotation.SiColumn;
import cn.com.dhcc.app.core.annotation.SiTable;
import cn.com.dhcc.app.core.base.ModuleFeatureBean;

/**
 * 权限优先级配置表
 * 
 * @日期：2014-9-15上午9:35:05
 * @作者：张洪涛
 * @版权所有：东华软件
 * @版本：1.0
 */
@SiTable(name = "turbo_priority_conf")
public class PriorityConf extends ModuleFeatureBean implements Serializable {
	private static final long serialVersionUID = 1L;
	@SiColumn(isId = true)
	private String id;// id
	@SiColumn(name = "own_type")
	private String ownType;// 对象类型　1：按发送数据分类　2：按接收系统　3：按接收节点　4：按发送系统　5：按业务域
	@SiColumn(name = "own_id")
	private String ownId;// 对象id
	@SiColumn(name = "limit_type")
	private String limitType;// 限制条件类型　1：固定时间范围内　2：固定发送次数范围内　3：因定流量范围
	@SiColumn(name = "begin_value")
	private String beginValue;// 开始值
	@SiColumn(name = "end_value")
	private String endValue;// 结束值
	private Date mtime;// 时间
	private String status;// 是否有效　1：有效　0：失效
	private String priority;//优先级 1 高（优先调度，并通过单独的通道发送） 2 中（优先调度，并等待通道空闲时发送） 3 默认（排队调度，并等待通道空闲时发送）
	
	public static enum PRIORITY_LEVEL {
		HIG ("1", "高"), 
		MID("2", "中"), 
		LOW ("3", "默认");
		private String code;
		private String name;

		PRIORITY_LEVEL(String code, String name) {
			this.code = code;
			this.name = name;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}
	}
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getOwnType() {
		return ownType;
	}

	public void setOwnType(String ownType) {
		this.ownType = ownType;
	}

	public String getOwnId() {
		return ownId;
	}

	public void setOwnId(String ownId) {
		this.ownId = ownId;
	}

	public String getLimitType() {
		return limitType;
	}

	public void setLimitType(String limitType) {
		this.limitType = limitType;
	}

	public String getBeginValue() {
		return beginValue;
	}

	public void setBeginValue(String beginValue) {
		this.beginValue = beginValue;
	}

	public String getEndValue() {
		return endValue;
	}

	public void setEndValue(String endValue) {
		this.endValue = endValue;
	}

	public Date getMtime() {
		return mtime;
	}

	public void setMtime(Date mtime) {
		this.mtime = mtime;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getPriority() {
		return priority;
	}

	public void setPriority(String priority) {
		this.priority = priority;
	}

	@Override
	public String toString() {
		return "PriorityConf [id=" + id + ", ownType=" + ownType + ", ownId="
				+ ownId + ", limitType=" + limitType + ", beginValue="
				+ beginValue + ", endValue=" + endValue + ", mtime=" + mtime
				+ ", status=" + status + ", priority=" + priority + "]";
	}

}
